<?php

## 执行登录功能
require_once 'global.php';
//$_POST['username']='小天';
//$_POST['passwd']='123456';
// 接收参数
$username = addslashes(trim($_POST['username']));

$passwd = addslashes($_POST['passwd']);

login($username, $passwd, "user");

//if (is_logged()) {
    echo to_json(ret_ok("next.php", "登录成功"));
//} else {
//    echo to_json(ret_fail("登录失败"));
//}